package ph.com.gs3.formalistics.view.document;

import java.util.List;

import org.json.JSONObject;

import ph.com.gs3.formalistics.model.vo.business.User;
import ph.com.gs3.formalistics.model.vo.business.document.DocumentHeaderData;
import ph.com.gs3.formalistics.model.vo.business.form.FormViewContentData;
import android.app.Activity;
import android.view.View;

public interface DocumentViewContentsManager {

	public View getCreatedDocumentViewContentsContainer();

	/**
	 * FIXME Make an abstract parent of document and outgoing action so that strategy
	 * design pattern may be applied to them. (Requires refactoring of the document view
	 * fragment and activity as well)
	 * 
	 * @param formViewContentDataList
	 * @param fieldValues
	 * @param document
	 * @param outgoingAction
	 */
	public void createDocumentViewsFromData(List<FormViewContentData> formViewContentDataList,
	        JSONObject fieldValues, DocumentHeaderData documentHeaderData, User currentUser);

	public void setSpecialFieldsListener(Activity activity);

	public View findFieldView(String fieldId);

	public void setFieldValue(String fieldId, String value);

	public JSONObject getFieldValues();

	public void notifyFieldsRequired(List<String> fieldsThatFailedValidation);
	
	// =====================================================
	// {{ Events

	public void onLoad();

	// }}

}
